<!DOCTYPE html >
<html xmlns:th="http://www.thymeleaf.org">
<head th:include="base :: header (title='装配派工中心')" />
<link th:href="@{plugins/common/css/basemessage.css}" rel="stylesheet" />
<link th:href="@{css/Production/piesZP.css}" rel="stylesheet" />
<body class="">
	<div class="main-content blank_bg">
		<div>
			<div>
				<div class="row" style="">
					<div>
						<div class="div_bg">
							<!-- 调用Production/productionPublic里的queryList，查询行 -->
							<div th:include="Production/productionPublic :: queryList" />
							
							<!-- 生产任务表 start -->
							<div style="margin-top: 5px;">
								<table id="taskTable" class="table dataTable table-hover">
								</table>
							</div>
							<!-- 生产任务表 end -->
						</div>
						
						<!-- 产品工艺路线显示表 start -->
						<div class="div_bg" style="width: 100%;margin-top: 15px;">
							<span style="margin-bottom: 10px;margin-top: 5px;" class="titleX">产品工艺路线</span>
							<div id="newProcess">
								<table id="newProcessTable" class="table dataTable table-hover" style="word-break:break-all; word-wrap:break-all;">
								</table>
							</div>
						</div>
						<!-- 产品工艺路线显示表 end -->
						
						<!-- 派工模态框 start -->
						<div class="modal fade " id="dispatchingModal" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="background-color: rgba(0, 0, 0, 0.5)" data-backdrop="static">
							<div class="modal-dialog" style="width: 800px; height: 220px;">
								<div class="modal-content" style="width: auto;">
									<div class="modal-header">
										<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
										<h4 class="modal-title" id="titleModal">派工</h4>
									</div>
									<div class="modal-body" style="height: auto; padding: 10px;">
										<form id="dispatchingForm" class="form-group">
											<div style="display: inline-block;overflow: hidden;margin-right: 15px;" id="">
												<table border="0" cellspacing="0" cellpadding="0" class="table-condensed normal-table table-content" id="">
													<tr>
														<td class="title"><span class="sub">生产任务单：</span></td>
														<td colspan="2">
															<input type="text" id="dispatchingfBillNo" name="fBillNo" class="clean_c form-control" readonly="readonly">
															<input type="hidden" id="dispatchingfIcmoId" name="fIcmoId" class="clean_c form-control" readonly="readonly">
														</td>
														<td class="title"><span class="sub">排程计划时间：</span></td>
														<td colspan="2"><input type="text" id="dispatchingfPlanDate" name="fPlanDate" class="clean_c form-control" readonly="readonly"></td>
													</tr>
													<tr>
														<td class="title"><span class="sub">产品名称：</span></td>
														<td colspan="2"><input type="text" id="dispatchingfName" name="fName" class="clean_c form-control" readonly="readonly"></td>
														<td class="title"><span class="sub">产品代码：</span></td>
														<td colspan="2"><input type="text" id="dispatchingfNumber" name="fNumber" class="clean_c form-control" readonly="readonly"></td>
													</tr>
													<tr>
														<td class="title"><span class="sub">规格型号：</span></td>
														<td colspan="5"><input type="text" id="dispatchingfModel" name="fModel" class="clean_c form-control" readonly="readonly"></td>
													</tr>
													<tr>
														<td class="title"><span class="sub">工序号：</span></td>
														<td><input type="text" id="dispatchingfOperSN" name="fOperSN" class="clean_c form-control" readonly="readonly"></td>
														<td class="title"><span class="sub">工序名称：</span></td>
														<td><input type="text" id="dispatchingfOperName" name="fOper" class="clean_c form-control" readonly="readonly"></td>
														<td class="title"><span class="sub">工作中心：</span></td>
														<td>
															<input type="text" id="dispatchingfDepName" name="fDepName" class="clean_c form-control" readonly="readonly">
															<input type="hidden" id="dispatchingfDepid" name="fDepid" class="clean_c form-control" readonly="readonly">
														</td>
													</tr>
													<tr>
														<td class="title"><span class="sub">设备组：</span></td>
														<td>
															<input type="text" id="dispatchingfMacGroupName" name="fMacGroupName" class="clean_c form-control" readonly="readonly">
															<input type="hidden" id="dispatchingfMacGroupId" name="fMacGroupId" class="clean_c form-control" readonly="readonly">
														</td>
														<td class="title"><span class="sub">是否外协：</span></td>
														<td><input type="text" id="dispatchingfIsOut" name="fIsOut" class="clean_c form-control" readonly="readonly"></td>
														<td class="title"><span class="sub">剩余可派工：</span></td>
														<td><input type="text" id="dispatchingnoDispatchQty" name="noDispatchQty" class="clean_c form-control" readonly="readonly"></td>
													</tr>
													<tr>
														<td class="title"><span class="sub">加工说明：</span></td>
														<td colspan="5"><input type="text" id="dispatchingfNote" name="fNote" class="clean_c form-control" readonly="readonly"></td>
													</tr>
													<tr>
														<td class="title"><span class="sub"><span class="requiredCss">*</span>派工数量：</span></td>
														<td><input type="text" id="dispatchingfTargetQty" name="fTargetQty" class="clean_c form-control bj_color" autocomplete="off" onkeyup="if(isNaN(value))execCommand('undo')" onafterpaste="if(isNaN(value))execCommand('undo')"></td>
														<td class="title"><span class="sub"><span class="requiredCss">*</span>开工时间：</span></td>
														<td><input type="text" id="dispatchingfStartTime" name="fStartTime" class="clean_c form-control bj_color noPass" autocomplete="off"></td>
														<td class="title"><span class="sub"><span class="requiredCss">*</span>完工时间：</span></td>
														<td><input type="text" id="dispatchingfEndTime" name="fEndTime" class="clean_c form-control bj_color noPass" autocomplete="off"></td>
													</tr>
													<tr>
														<td class="title"><span class="sub"><span class="requiredCss">*</span>设备：</span></td>
														<!-- 下拉框默认向上弹出，class里加dropup，标签里加data-dropup-auto="false" -->
														<td colspan="2"><select name="fMacId" id="dispatchingfMacId" class="selectpicker dropup clean_c" data-live-search="true" data-width="100%" data-style="btn-success" data-dropup-auto="false"></select></td>
														<td class="title"><span class="sub">是否工序入库：</span></td>
														<td>
															<label style="line-height: 26px;margin-bottom: 0;">
																<input name="fIsOperInStock" type="checkbox" value="1" id="dispatchingfIsOperInStock" style="width: auto !important;vertical-align: middle;margin: -2px 2px 0 0;">是
															</label>
														</td>
														<!-- <td class="title"><span class="sub">是否领料：</span></td>
														<td style="display: none;">
															<label style="line-height: 26px;margin-bottom: 0;">
																<input name="fIsOutStock" type="checkbox" value="1" id="dispatchingfIsOutStock" style="width: auto !important;vertical-align: middle;margin: -2px 2px 0 0;" disabled="disabled">是
															</label>
														</td> -->
													</tr>
												</table>
												<div style="width: 100%;">
													<div>
														<span style="padding-left: 17px;" class="requiredCss">注：带*为必填字段。</span>
													</div>
													<div style="text-align: center;margin-top: 10px;">
														<button type="button" class="btn btn-default" id="confirm" style="margin-right: 20px;">确定</button>
														<button type="button" class="btn btn-default" id="cancel" data-dismiss="modal">取消</button>
													</div>
												</div>
											</div>
										</form>
									</div>
								</div>
							</div>
						</div>
						<!-- 派工模态框 end -->
						
						<!-- 修改设备模态框 start -->
						<div class="modal fade " id="modifyModal" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="background-color: rgba(0, 0, 0, 0.5)" data-backdrop="static">
							<div class="modal-dialog" style="width: 800px; height: 220px;">
								<div class="modal-content" style="width: auto;">
									<div class="modal-header">
										<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
										<h4 class="modal-title" id="titleModal">派工设备修改</h4>
									</div>
									<div class="modal-body" style="height: auto; padding: 10px;">
										<div style="margin-bottom: 5px;">
											<div style="float:left">
												<span class="spanCss">派工单号：</span> 
												<input type="text" id="modifyfCode" name="fCode" class="form-control clean-M" style="width: 150px; margin-right: 10px;" /> 
											</div>
											<div style="float:left">
												<span class="spanCss">设备名称：</span>
												<select name="modifyDdevice" id="modifyDdevice" class="selectpicker clean_M " data-live-search="true" data-width="auto">
												</select>
											</div>
											<div style="float:left">
												<button id="query_modify" class="btn btn-default " type="button" style="margin-left: 10px;">查询</button>
												<button type="button" class="btn btn-default " id="resetting_modify">重置</button>
											</div>
											<div style="clear:both"></div>
										</div>
										<div style="">
											<table id="piesTable" class="table dataTable table-hover tableList" style="">
											</table>
										</div>
										<div>
											<span class="requiredCss">注：选择设备即可保存！</span>
										</div>
									</div>
								</div>
							</div>
						</div>
						<!-- 修改设备模态框 end -->
						<div class="modal fade " id="setout" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="background-color: rgba(0, 0, 0, 0.5)" data-backdrop="static">
							<div class="modal-dialog" style="width: 760px; height: 220px;">
								<div class="modal-content" style="width: auto;">
									<div class="modal-header">
										<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
										<h4 class="modal-title" id="myModalLabel">委外转出</h4>
									</div>
									<div class="modal-body" style="height: auto; padding: 10px;">
										<form id="inOutForm" class="form-group">
											<table border="0" cellspacing="0" cellpadding="0" class="table-condensed normal-table short-table" style="width: 710px !important;margin: 5px 15px;">
												<tr>
													<td style="width: 110px;"><span>工序代码：</span></td>
													<td style="width: 180px;">
														<input type="text" id="fOperNumber" name="fOperNumber" class="clean_c form-control" readonly="readonly" />
													</td>
													<td style="width: 110px;"><span>工序名称：</span></td>
													<td style="width: 180px;">
														<input type="text" id="fOperName" name="fOperName" class="clean_c form-control" readonly="readonly" />
													</td>
												</tr>
												<tr>
													<td><span>物料代码：</span></td>
													<td>
														<input type="text" id="fItemId" name="fItemId" class="clean_c form-control" readonly="readonly" />
													</td>
													<td><span>物料名称：</span></td>
													<td>
														<input type="text" id="wlName" name="wlName" class="clean_c form-control" readonly="readonly" />
													</td>
												</tr>
												<tr id="outNum">
													<td><span>可转出数量：</span></td>
													<td>
														<input type="text" id="num" name="num" class="clean_c form-control" readonly="readonly" />
													</td>
													<td><span class="requiredCss">*</span><span>委外数量：</span></td>
													<td>
														<input type="text" id="fQty" name="fQty" class="clean_c form-control bj_color" autocomplete="off" onkeyup="if(isNaN(value))execCommand('undo')" onafterpaste="if(isNaN(value))execCommand('undo')" />
													</td>
												</tr>
												<tr>
													<td><span id="companyID">加工单位ID：</span></td>
													<td>
														<input type="text" id="fSupplierID" name="fSupplierID" class="clean_c form-control" readonly="readonly" />
													</td>
													<td><span class="requiredCss">*</span><span id="companyName">加工单位：</span></td>
													<td>
														<input type="text" id="fSupplierName" name="fSupplierName" class="clean_c form-control bj_color" autocomplete="off" />
													</td>
												</tr>
												<tr id="outDate">
													<td><span>单价：</span></td>
													<td>
														<input type="text" id="price" name="price" class="clean_c form-control bj_color" autocomplete="off" onkeyup="if(isNaN(value))execCommand('undo')" onafterpaste="if(isNaN(value))execCommand('undo')" />
													</td>
													<td><span class="requiredCss">*</span><span>交货日期：</span></td>
													<td>
														<input type="text" id="fFetchDate" name="fFetchDate" class="clean_c form-control bj_color" autocomplete="off" />
													</td>
												</tr>
												<tr id="outPerson">
													<td><span class="requiredCss">*</span><span>转出人ID：</span></td>
													<td>
														<input type="text" id="empCardNoOut" name="empCardNo" class="clean_c form-control bj_color" autocomplete="off" />
													</td>
													<td><span>转出人：</span></td>
													<td>
														<input type="text" id="turnOutP" name="turnOutP" class="clean_c form-control" readonly="readonly" />
													</td>
												</tr>
												<tr>
													<td colspan="4" style="text-align: left;">
														<span style="color: red;padding-left: 25px;" id="content">
														注：带*为必填字段。选加工单位后，加工单位ID里才有数据！输入转出人ID按回车后，才会显示转出人姓名！
														</span>
													</td>
												</tr>
												<tr>
													<td colspan="4" style="text-align: center;">
														<div style="">
															<button type="button" class="btn btn-default" id="confirm_out" style="margin-right: 20px;">确定</button>
															<button type="button" class="btn btn-default" id="cancel" data-dismiss="modal">取消</button>
														</div>
													</td>
												</tr>
											</table>
										</form>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	<span id="value" style="display: none;">1</span>
	<div th:include="base :: bottom" />
	<div th:include="base :: bootstrapTable" />
	<div th:include="base :: bootstrapTable-eidt" />
	<div th:include="base :: others" />
	<!-- 车间下拉框公共js -->
	<script th:src="@{js/Production/productionPublic.js}"></script>
	<script th:src="@{js/Production/piesZP.js}"></script>
</body>
</html>
